using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using DBSourceToolsLib;
using DBSourceToolsLib.SysObjects;
using DBConnectionLib;

namespace TestDBSourceToolsLibNUnit
{
    [TestFixture]
    [Ignore]
    public class TestDatabaseListEx
    {
        [Test]
        public void TestLoadDatabases()
        {
            DatabaseListEx oDbEx = new DatabaseListEx(BaseDirectoryHelper.TestFiles);
            oDbEx.LoadExList(BaseDirectoryHelper.TestFiles,
                BaseDirectoryHelper.TestFiles + @"\DatabaseLists\Databases.xml", true, false);

            DatabaseEx oDatabaseEx = oDbEx.getDatabaseEx("DBSourceToolsTest");
            Assert.IsNotNull(oDatabaseEx, "Could not find database DBSourceToolsTest");

            string sCorrectBaseDir = BaseDirectoryHelper.TestFiles + "\\DBSourceToolsTest";
            Assert.IsTrue(oDatabaseEx.BaseDirectory.CompareTo(sCorrectBaseDir) == 0, "Base Directory should be " + sCorrectBaseDir);
        }
    }
}
